package com.dayuanit.mall.bank.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.dayuanit.mall.bank.domain.SinaOrder;

public interface SinaOrderDao {
	
	int add(SinaOrder sinaOrder);
	
	SinaOrder getOrderById(Integer id);
	
	SinaOrder getOrderByMerchantIdAndOrderId(@Param("merchantId")String merchantId, @Param("orderId")String orderId);
	
	int updateOrderBystatus(@Param("id")Integer id, @Param("oldStatus")int oldStatus, @Param("newStatus")int newStatus);
	
	List<SinaOrder> listSinaOrders4Notify(@Param("status")int status, @Param("notifyStatus")int notifyStatus, @Param("preNum")int preNum, @Param("off")int off, @Param("notifyMaxTimes")int notifyMaxTimes);
	
	int updateNotifyStatus(@Param("id")Integer id, @Param("oldNotifyStatus")Integer oldNotifyStatus, @Param("newNotifyStatus")Integer newNotifyStatus);

	int updateNotifyTimes(@Param("id")Integer id);
	
}
